<?php

class Artist extends AppModel
{
    var $recursive = 2;
    
    var $hasMany = array(
        "Track", 
        "Event",
		"Track_artist",
        "Photo" => array(
            'foreignKey' => 'object_key',
            'limit' => 4,
            'conditions' => array('object_type' => 'artist')
        ));
        
    var $hasAndBelongsToMany = array(
        'Tag' => array(
            'className' => 'Tag',
             'joinTable' => 'object_tags',
             'foreignKey' => 'object_id',
            'associationForeignKey' => 'tag_id',
            'unique' => true,
            
            'conditions' => array('object_type' => 'artist')));
}

?>